#!usr/bin/env python  
# -*- coding:utf-8 _*-
""" 
@author:robot
@file: feishu_webhook.py 
@version:
@time: 2022/03/18 
"""

import requests


class FeiShuWebHook:

    @staticmethod
    def send(url, data):
        while True:
            response = requests.post(
                url,
                json=data
            ).json()
            print(response)
            if response.get("StatusMessage") == "success":
                break
